Repository navigation
ci(e2e): Run e2e suite on WordPress Playground - #1386
Draft
utkarshcloudinary wants to merge 2 commits into
Draft
utkarshcloudinary wants to merge 2 commits into
utkarshcloudinary wants to merge 2 commits into
Conversation
Add a Docker-free way to run the Playwright suite. A Node script boots the site in WordPress Playground (PHP on WebAssembly, SQLite) with core, PHP version and constants from .wp-env.ci.json, and serves a small WP-CLI bridge so the spec helpers keep working without docker exec. Add a CI job that runs the suite this way next to the wp-env job, so the two can be compared before one replaces the other. Also wait for the gallery block to load in the editor before the spec reads it from the block store.
utkarshcloudinary
changed the base branch from
chore/wp-7-2-compatibility
to
develop
November 23, 2026 14:58
Run only the storage-modes spec on a 1-worker Playground site. The other serial specs time out there on CI, because the block editor saves too slowly with one PHP worker. Stop logging WP-CLI arguments and stderr in the Playground server log. They can contain the Cloudinary connection string, and CI uploads that log as an artifact.
utkarshcloudinary
changed the base branch from
develop
to
chore/wp-7-2-compatibility
November 23, 2026 15:26
utkarshcloudinary
changed the base branch from
chore/wp-7-2-compatibility
to
develop
November 23, 2026 15:27
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft. Runs the Playwright e2e suite on WordPress Playground (PHP compiled to WebAssembly, SQLite) instead of wp-env, so the job does not need Docker images, containers or MariaDB. A new CI job runs next to the current wp-env job, so we can compare the two before one replaces the other. This started as a stacked PR on #1377. #1377 was merged while this PR was in progress, so this PR now targets
develop.Approach
tests/e2e/playground/server.mjsboots the site with@wp-playground/clirunCLI(). It reads core, the PHP version and the constants from.wp-env.ci.json, mounts the plugin and.wp-env/mu-plugins, and listens on port 8889, like the wp-env tests site.docker exec. The server also serves a small WP-CLI bridge on127.0.0.1:8890. WhenWP_E2E_RUNTIME=playgroundis set,wpCli()andwpEvalFile()intests/e2e/utils/wizard.jssend commands to the bridge. The calls stay synchronous, so no spec call sites change. Shell-quoted arguments are split the same way a shell would split them, and PHP warnings go to stderr, like with the CLI SAPI.tests/e2e/playground/run-e2e.sh(npm run test:e2e:playground) runs three passes. Each pass gets a fresh site: the parallel pass and the other@serialspecs on 6 PHP workers, and the storage-modes spec on 1 PHP worker. With more than one worker,@wp-playground/cli3.1.61 can let one worker see a file that another worker deleted:file_exists()is true andfilesize()fails. I also tried disabling WP-Cron and blocking the plugin's loopback requests. Neither change fixed it. With 1 worker, the block editor saves too slowly on CI for the other specs, so only the storage-modes spec uses 1 worker.e2e-playgroundCI job caches~/.wordpress-playground.@wp-playground/cliis now a direct devDependency (3.1.61, the version@wordpress/envalready installs).Results so far
QA notes
npm run test:e2e:playgroundwithCLOUDINARY_E2E_URLset. Both passes should pass.npm run test:e2e:playground -- tests/e2e/plugin.spec.js.E2E (Playwright, Playground)takes againstE2E (Playwright).